Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LLVM_ENABLE_RUNTIMES=flang-rt for UnifiedTreeBuilder builders #387

Merged

Conversation

Meinersbur
Copy link
Member

@Meinersbur Meinersbur commented Feb 21, 2025

Add depends_on_projects=['flang-rt'] and checks=['check-flang-rt'] to Linaro's builders that are based on UnifiedTreeBuilder. This prepares the removal of the "projects" build of the flang runtime in llvm/llvm-project#124126.

Split off from #333

Affected builders:

  • flang-aarch64-dylib
  • flang-aarch64-sharedlibs
  • flang-aarch64-debug-reverse-iteration
  • flang-aarch64-libcxx
  • flang-aarch64-release
  • flang-aarch64-rel-assert
  • flang-aarch64-latest-gcc

Affected workers:

  • linaro-flang-aarch64-dylib
  • linaro-flang-aarch64-sharedlibs
  • linaro-flang-aarch64-debug-reverse-iteration
  • linaro-flang-aarch64-libcxx
  • linaro-flang-aarch64-release
  • linaro-flang-aarch64-rel-assert
  • linaro-flang-aarch64-latest-gcc

I could locally confirm that flang-aarch64-dylib works on a x86_64 host (since I don't have an aarch machine other than a Raspberry Pi readily available)

Copy link
Contributor

@luporl luporl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
@ceseo, you've already confirmed that LLVM_ENABLE_RUNTIMES=flang-rt and check-flang-rt work on AArch64/Linux, right?

@Meinersbur Meinersbur changed the title [Flang-RT] LLVM_ENABLE_RUNTIMES=flang-rt for UnifiedTreeBuilder builders LLVM_ENABLE_RUNTIMES=flang-rt for UnifiedTreeBuilder builders Feb 26, 2025
@ceseo
Copy link

ceseo commented Feb 26, 2025

LGTM.

@ceseo, you've already confirmed that LLVM_ENABLE_RUNTIMES=flang-rt and check-flang-rt work on AArch64/Linux, right?

Yes, both stage1 and stage2.

@Meinersbur Meinersbur merged commit 47578d3 into llvm:main Feb 26, 2025
2 checks passed
@Meinersbur
Copy link
Member Author

Meinersbur commented Apr 1, 2025

After a buildbot master restart flang-aarch64-libcxx (only) stopped working. The error message

/usr/bin/ld: flang-rt/unittests/Runtime/CMakeFiles/RuntimeTests.dir/AccessTest.cpp.o: in function `createTemporaryFile[abi:cxx11](char const*, (anonymous namespace)::AccessType const&)':
AccessTest.cpp:(.text._ZL19createTemporaryFileB5cxx11PKcRKN12_GLOBAL__N_110AccessTypeE+0x194): undefined reference to `llvm::Twine::str[abi:cxx11]() const'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

indicates an ABI issue. Maybe using the wrong headers or linking the wrong library? The issue should be with LLVM_ENABLE_LIBCXX=ON and probably would affect all LLVM_ENABLE_RUNTIMES.

@DavidSpickett
Copy link
Contributor

@antmox FYI for flang-aarch64-libcxx.

I would start by double checking whether the flang-rt tests get built with the host compiler, or the clang that was just built, and what stdlib that/those default to. Also note that this bot does not build libcxx, it uses the host compiler's pre-built version of it.

What could be happening is that the host compiler builds the llvm libraries with libcxx, then the just built clang does not. So the flang-rt test is then trying to combine libstdc++ and libc++.

I'm not sure we want this bot to be building libcxx as well, but just as an experiment, you could also trying adding that to ENABLE_RUNTIMES and getting the just built clang to use that. Another option may be to tell the just built clang where the host's libcxx is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants